package org.steven.crm.core.auth;

import java.util.Map;

/**
 * @Author wuzw
 * @Date 2021/7/3 11:38
 * @Version 1.0
 */
public class UserSession {
    private static ThreadLocal<Map<String, String>> userThreadLocal = new ThreadLocal<>();

    public static Map<String, String> get() {
        return userThreadLocal.get();
    }

    public static void set(Map<String, String> user) {
        userThreadLocal.set(user);
    }

    public static void destroy() {
        userThreadLocal.remove();
    }
}
